package com.lang.downloader.http.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class CacheFile implements Serializable, Comparable<CacheFile> {
    private String httpUrl;
    private Integer order;
    private String filePath;
    private long start;
    private long end;
    private boolean done = false; //下载完成
    private long length;

    @Override
    public int compareTo(CacheFile o) {
        return this.order - o.order;
    }
}
